<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script>
    // //2022-9-10 16:39:00
    var time = new Date("2022-9-10 16:39:00")     //标准时间格式
    var timestamp = new Date("2022-9-10 16:39:00").getTime()    //某一时刻的时间戳

    var nowtime = new Date()                //当前时间标准格式
    var nowtimestamp = new Date().getTime()   //当前时间戳
    // console.log(nowtimestamp)

    var distance = Math.floor((nowtimestamp - timestamp) / 1000 / 3600 / 24)
    console.log(distance)


    // 1小时多少秒     1*60*60=3600秒

    //2022-09-15T08:23:40.462Z
    // var time=new Date("2022-09-15T08:23:40.462Z")
    var time=new Date("2022-09-15T08:28:54.419Z")
    console.log(time)



  </script>
</head>

<body>

</body>

</html>